package com.ibeeking.gmc.global.g.rest.controller.v1.feign;

import com.ibeeking.gmc.global.g.rest.service.IJobCreateService;
import com.ibeeking.found.common.entity.TimeTaskJobParam;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName BunkInfoController控制器
 * @Description OAuth2.0客户端
 * @Author ibeeking
 * @Date 2020-10-22 10:34
 **/
@RestController
@RequestMapping("/g/job/feign/v1")
public class GlobalJobFeignController {

    @Resource
    private IJobCreateService jobCreateServiceImpl;

    /**
     * 创建租户定时数据分发任务
     * @param param
     * @return
     */
    @PostMapping(value = "/createJobInfoForTenantDataSync")
    public Boolean createJobInfoForTenantDataSync(@RequestBody TimeTaskJobParam param) {
        return jobCreateServiceImpl.createJobInfoForTenantDataSync(param);
    }
    /**
     * 删除租户定时数据分发任务
     * @param param
     * @return
     */
    @PostMapping(value = "/delJobInfoForTenantDataSync")
    public Boolean delJobInfoForTenantDataSync(@RequestBody TimeTaskJobParam param) {
        return jobCreateServiceImpl.delJobInfoForTenantDataSync(param);
    }

}